package RMIBank;

import java.rmi.Naming;

public class ServerMain {

    public static void main(String[] args) {
        try {
            Bank bank = new ConcreteBank();

            java.rmi.registry.LocateRegistry.createRegistry(1099);
            Naming.rebind("rmi://localhost/RMIBank/Bank", bank);

            System.out.println("RMI Bank service is now running...");
        } catch (Exception ex) {
            System.out.println("Failed to start RMI Bank server!\n");
        }
    }
}
